package com.jxw.studyrecord;

import android.text.TextUtils;
import android.util.Log;

/* loaded from: classes.dex */
public class StudyRecordPrimaryNameEx extends StudyRecordBaseName {
    private static final String CH_BASE_WORD = "基础词语";
    private static final String CH_CHARACTER = "汉字学习";
    private static final String CH_CLASSIC_CH = "文言文";
    private static final String CH_CLASSIC_POETRY = "古诗词";
    private static final String CH_MODERN_READ = "现代文阅读";
    private static final String CH_PIAN_PANG = "偏旁部首";
    private static final String CH_PIN_YIN = "拼音学习";
    private static final String CH_PUNCTUATION = "标点符号";
    private static final String CH_READ = "阅读指导";
    private static final String CH_RHETORIC = "修辞手法";
    private static final String CH_STROKE_NAME = "笔画名称";
    private static final String CH_STROKE_RULE = "笔顺规则";
    private static final String CH_VALUABLE = "中华宝典";
    private static final String CH_WRITING = "语文写作";
    private static final String EN_GRAMMAR = "英语语法";
    private static final String EN_LETTER = "英文字母";
    private static final String EN_LISTENING_TRAINING = "听力训练";
    private static final String EN_MIDDLE_VOCABULARY = "中学词汇";
    private static final String EN_READ = "英语阅读";
    private static final String EN_SPOKEN = "口语交际";
    private static final String EN_VOCABULARY = "英语词汇";
    private static final String EN_WRITING = "英语写作";
    private static final String FORMULA = "公式大全";
    private static final String MATH_AO_SHU = "奥数训练";
    private static final String MATH_EQUATION = "式与方程";
    private static final String MATH_EQUATION_EXPLAIN = "方程精解";
    private static final String MATH_FORMULA = "数学公式";
    private static final String MATH_FUNC = "函数解析";
    private static final String MATH_GEOMETRY = "几何定理";
    private static final String MATH_KOU_JUE = "算术口诀";
    private static final String MATH_NUMBER = "认识数字";
    private static final String MATH_NUM_ARITHMETIC = "数的运算";
    private static final String MATH_YING_YONG_TI = "应用题训练";
    private static final String MORE_USER_GUIDE = "使用指南";
    private static final String ONLINE_QA = "在线答疑";
    private static final String PERIODIC_TABLE = "元素周期表";
    private static final String PREPARE_TEST = "备战中高考";
    private static final String SIMULATION_TEST = "模拟考场";
    private static final String SYNSTUDYDD_CN = "同步点读-语文";
    private static final String SYNSTUDYDD_EN = "同步点读-英语";
    private static final String SYNSTUDYDD_MATH = "同步点读-数学";
    private static final String SYNSTUDYFD_BIOLOGY = "同步辅导-生物";
    private static final String SYNSTUDYFD_CHEMISTRY = "同步辅导-化学";
    private static final String SYNSTUDYFD_CN = "同步辅导-语文";
    private static final String SYNSTUDYFD_EN = "同步辅导-英语";
    private static final String SYNSTUDYFD_GEOGRAPHY = "同步辅导-地理";
    private static final String SYNSTUDYFD_HISTORY = "同步辅导-历史";
    private static final String SYNSTUDYFD_KEXUE = "同步辅导-科学";
    private static final String SYNSTUDYFD_MATH = "同步辅导-数学";
    private static final String SYNSTUDYFD_PHYSICS = "同步辅导-物理";
    private static final String SYNSTUDYFD_POLITICS = "同步辅导-政治";
    private static final String SYNSTUDY_BIOLOGY = "同步学习-生物";
    private static final String SYNSTUDY_CHEMISTRY = "同步学习-化学";
    private static final String SYNSTUDY_CN = "同步学习-语文";
    private static final String SYNSTUDY_EN = "同步学习-英语";
    private static final String SYNSTUDY_GEOGRAPHY = "同步学习-地理";
    private static final String SYNSTUDY_HISTORY = "同步学习-历史";
    private static final String SYNSTUDY_MATH = "同步学习-数学";
    private static final String SYNSTUDY_PHYSICS = "同步学习-物理";
    private static final String SYNSTUDY_POLITICS = "同步学习-政治";
    private static final String TAG = "StudyRecordPrimaryNameEx";

    public static String getName(String str, String str2, String str3) {
        if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
            Log.i(TAG, "getName(): packageName or className is empty");
            return null;
        }
        String onLineStudyName = getOnLineStudyName(str, str2, str3);
        if (TextUtils.isEmpty(onLineStudyName)) {
            String fileListName = getFileListName(str, str2, str3);
            if (TextUtils.isEmpty(fileListName)) {
                String dictName = getDictName(str, str2, str3);
                if (TextUtils.isEmpty(dictName)) {
                    String otherComName = getOtherComName(str, str2);
                    return !TextUtils.isEmpty(otherComName) ? otherComName : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_ONLINE_QA, str2, StudyRecordAPKInfo.CLASS_ONLINE_QA) ? ONLINE_QA : (isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_SIMULATION_TEST, str2, StudyRecordAPKInfo.CLASS_SIMULATION_TEST) || isSamePackageClassName(str, "com.jxw.examsystem", str2, StudyRecordAPKInfo.CLASS_MNKS_TEST)) ? SIMULATION_TEST : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_PERIODIC_TABLE, str2, StudyRecordAPKInfo.CLASS_PERIODIC_TABLE) ? PERIODIC_TABLE : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_LETTER, str2, StudyRecordAPKInfo.CLASS_LETTER) ? EN_LETTER : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_PIN_YIN, str2, StudyRecordAPKInfo.CLASS_PIN_YIN) ? CH_PIN_YIN : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_STROKE_NAME, str2, "com.example.viewpageindicator.MainActivity") ? CH_STROKE_NAME : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_PIAN_PANG, str2, "com.example.viewpageindicator.MainActivity") ? CH_PIAN_PANG : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_STROKE_RULE, str2, "com.example.viewpageindicator.MainActivity") ? CH_STROKE_RULE : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_CHARACTER, str2, StudyRecordAPKInfo.CLASS_CHARACTER) ? CH_CHARACTER : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_NUMBER, str2, StudyRecordAPKInfo.CLASS_NUMBER) ? MATH_NUMBER : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_KOU_JUE, str2, StudyRecordAPKInfo.CLASS_KOU_JUE) ? MATH_KOU_JUE : otherComName;
                }
                return dictName;
            }
            return fileListName;
        }
        return onLineStudyName;
    }

    private static String getOnLineStudyName(String str, String str2, String str3) {
        String str4;
        if (TextUtils.isEmpty(str3) || !str.equals(StudyRecordAPKInfo.PACKAGE_NAME_ON_LINE_STUDY)) {
            return null;
        }
        if (str2.equals(StudyRecordAPKInfo.CLASS_NAME_ON_LINE_STUDY)) {
            String fileName = getFileName(str3, true);
            if (!TextUtils.isEmpty(fileName)) {
                if (fileName.equals("备战中高考")) {
                    return "备战中高考";
                }
                if (fileName.equals("公式大全")) {
                    return "公式大全";
                }
                if (fileName.equals("口语交际")) {
                    return "口语交际";
                }
                if (fileName.equals("英语词汇")) {
                    return "英语词汇";
                }
                if (fileName.equals("英语阅读")) {
                    return "英语阅读";
                }
                if (fileName.equals("英语语法")) {
                    return "英语语法";
                }
                if (fileName.equals("英语写作")) {
                    return "英语写作";
                }
                if (fileName.equals("听力训练")) {
                    return "听力训练";
                }
                if (fileName.equals("中学词汇")) {
                    return "中学词汇";
                }
                if (fileName.equals("中华宝典")) {
                    return "中华宝典";
                }
                if (fileName.equals("基础词语")) {
                    return "基础词语";
                }
                if (fileName.equals("古诗词")) {
                    return "古诗词";
                }
                if (fileName.equals("阅读指导")) {
                    return "阅读指导";
                }
                if (fileName.equals("语文写作")) {
                    return "语文写作";
                }
                if (fileName.equals("现代文阅读")) {
                    str4 = "现代文阅读";
                } else if (fileName.equals("文言文")) {
                    str4 = "文言文";
                } else if (fileName.equals("修辞手法")) {
                    str4 = "修辞手法";
                } else if (fileName.equals("标点符号")) {
                    str4 = "标点符号";
                } else if (fileName.equals("数的运算")) {
                    str4 = "数的运算";
                } else if (fileName.equals("式与方程")) {
                    str4 = "式与方程";
                } else if (fileName.equals("应用题训练")) {
                    str4 = "应用题训练";
                } else if (fileName.equals("奥数训练")) {
                    str4 = "奥数训练";
                } else if (fileName.equals("数学公式")) {
                    str4 = "数学公式";
                } else if (fileName.equals("函数解析")) {
                    str4 = "函数解析";
                } else if (fileName.equals("几何定理")) {
                    str4 = "几何定理";
                } else if (fileName.equals("方程精解")) {
                    str4 = "方程精解";
                } else if (fileName.equals("使用指南")) {
                    str4 = "使用指南";
                }
                return str4;
            }
        } else if (str2.equals(StudyRecordAPKInfo.CLASS_NAME_ON_LINE_STUDY_LIST)) {
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHFD)) {
                return SYNSTUDYFD_CN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_MATHFD)) {
                return SYNSTUDYFD_MATH;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_ENFD)) {
                return SYNSTUDYFD_EN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PHYSICSFD)) {
                return SYNSTUDYFD_PHYSICS;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHEMISTRYFD)) {
                return SYNSTUDYFD_CHEMISTRY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_BIOLOGYFD)) {
                return SYNSTUDYFD_BIOLOGY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_HISTORYFD)) {
                return SYNSTUDYFD_HISTORY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_GEOGRAPHYFD)) {
                return SYNSTUDYFD_GEOGRAPHY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_POLITICSFD)) {
                return SYNSTUDYFD_POLITICS;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHDD)) {
                return SYNSTUDYDD_CN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_MATHDD)) {
                return SYNSTUDYDD_MATH;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_ENDD)) {
                return SYNSTUDYDD_EN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CH)) {
                return SYNSTUDY_CN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_MATH)) {
                return SYNSTUDY_MATH;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_EN)) {
                return SYNSTUDY_EN;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PHYSICS)) {
                return SYNSTUDY_PHYSICS;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_CHEMISTRY)) {
                return SYNSTUDY_CHEMISTRY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_BIOLOGY)) {
                return SYNSTUDY_BIOLOGY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_HISTORY)) {
                return SYNSTUDY_HISTORY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_GEOGRAPHY)) {
                return SYNSTUDY_GEOGRAPHY;
            }
            if (str3.contains(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_POLITICS)) {
                return SYNSTUDY_POLITICS;
            }
        }
        return null;
    }
}
